import Test from "./test";
import { useRef } from "react";

const Menu1 = () => {
	const getNumHandler = (req: any) => {
		console.log(req);
	};
	let childRef: any = useRef(null);
	const handleClick = () => {
		childRef.current.add(); //调用
	};
	return (
		<div className="card content-box">
			<Test innerRef={childRef} getNum={getNumHandler}></Test>
			<span onClick={() => handleClick()} className="text">
				Menu1 🍓🍇🍈🍉
			</span>
		</div>
	);
};

export default Menu1;
